﻿<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet  [
	<!ENTITY nbsp   "&#160;">
	<!ENTITY copy   "&#169;">
	<!ENTITY reg    "&#174;">
	<!ENTITY trade  "&#8482;">
	<!ENTITY mdash  "&#8212;">
	<!ENTITY ldquo  "&#8220;">
	<!ENTITY rdquo  "&#8221;"> 
	<!ENTITY pound  "&#163;">
	<!ENTITY yen    "&#165;">
	<!ENTITY euro   "&#8364;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:user="CityFly" xmlns:page="urn:page">
  <xsl:output method="html" encoding="utf-8" />
  <xsl:param name="rowcount"/>
  <!--数据库总记录数-->
  <xsl:param name="maxrow"/>
  <!--每页记录数-->
  <xsl:param name="curpage"/>
  <!--当前页码-->
  <xsl:param name="param"/>
  <!--引入 param 参数-->
  <xsl:param name="templatename"/>
  <!--Label.xml 模块名称-->
  <xsl:param name="orderby"/>
  <!--Label.xml orderby 参数-->
  <xsl:param name="where"/>
  <!--Label.xml where 参数-->
  <xsl:param name="runtime"/>
  <!--运行时长-->
  <msxsl:script language="javascript" implements-prefix="user">var n=5;
    var mR={MAXROW};
    function PageList(cP,rC,qStr){
    var pC=(rC%mR==0)?rC/mR:int(rC/mR)+1;
    var pStr="";
    cP=int(cP);
    if (pC>cP+n){var eP=cP+n;}else{var eP=pC;}
    if (cP-n&lt;=0){var sP=1;}else{var sP=cP-n;}
    if(cP>1){pStr=pStr+" &lt;a href=javascript:TM.tList("+(cP-1)+")&gt;&lt;&lt;&lt;\/a&gt; ";}
    if (cP>n+1){pStr=pStr+"&lt;a href=javascript:TM.tList(1)&gt;1&lt;\/a&gt; ...";}
    for (var i=sP;i&lt;=eP;i++)
    {
    if (i==cP)
    {
    pStr=pStr+" &lt;font class='current' &gt;&lt;b&gt;"+i+"&lt;/b&gt;&lt;\/font&gt; ";
    }else{
    pStr=pStr+" &lt;a href=javascript:TM.tList(" + i + ")&gt;"+i+"&lt;\/a&gt; ";
    }
    }
    if (pC>cP+n){pStr=pStr+"... &lt;a href=javascript:TM.tList("+pC+") class='path'&gt;"+pC+"&lt;\/a&gt;";}
    if(cP&lt;pC){pStr=pStr+" &lt;a href=javascript:TM.tList("+(cP+1)+")&gt;&gt;&gt;&lt;\/a&gt; ";}
    pStr=pStr+'&lt;input accesskey="g" title="快捷键(G)" style="border:1px solid #eeeeee;width:30px" id="page" type="text"/&gt;&lt;input  type="image" src="/Icons/bbGotopage.gif" onclick="TM.tList(TM.$(\'page\').value)" alt="Go" align="absmiddle" border="0" /&gt;'
    return pStr;
    }</msxsl:script>
  <xsl:template match="/">
    <div class="datastatus">
      <div id="runtime"> <strong>&nbsp;运行时长</strong><img src="/Images/Common/tangle.gif" width="10" height="10" hspace="2" align="absmiddle" /><xsl:value-of select="substring($runtime,1,6)"/>秒 </div>
      <div class="all">
        <input class="btnA" onclick="TM.tQuery()" type="button" value="全部" name="Submit52" />
      </div>
      <div class="query"> <strong>查询条件<img src="/Images/Common/tangle.gif" hspace="2" vspace="2" align="absmiddle" /></strong> <span id="queryString_{$templatename}">&nbsp;</span> </div>
    </div>
    <div class="dataQuery">
      <form id="query_company">
        <label>编号:
          <input name="IDStart" type="text" class="w50" id="IDStart" value="{page:xRequest('idstart')}" />
          -
          <input name="IDEnd" type="text" class="w50" id="IDEnd" value="{page:xRequest('idend')}" />
        </label>
        <label>所属地区:
          <select name="addr">
            <option value="">不限</option>
            <xsl:value-of select="page:xLoadList('区域',10,page:xRequest('addr'))" disable-output-escaping="yes"/>
          </select>
        </label>
        <label>发布日期:
          <select name="updatetime">
            <option value="" selected="selected">不限</option>
            <option value="1">近一天</option>
            <option value="2">近两天</option>
            <option value="3">近三天</option>
            <option value="7">近一周</option>
            <option value="14">近两周</option>
            <option value="30">近一月</option>
            <option value="60">近两月</option>
            <option value="90">近三月</option>
          </select>
        </label>
        <input class="btnA" onclick="TM.tQuery(Form.serialize('query_company'))" type="button" value="查询" />
      </form>
    </div>
    <div class="datahead">
      <div class="colLeft" style="WIDTH: 30px">
        <input 
onclick="TM.CheckBoxSelect('ID',this.checked)" type="checkbox" />
      </div>
      <div class="colLeft center" style="WIDTH: 50px"> 编号 </div>
      <div class="colLeft" style="WIDTH: 240px"> 客户名称</div>
      <div class="colLeft" style="WIDTH: 180px"> 联系信息 </div>
      <div class="colLeft" style="WIDTH: 120px"> 帐号信息 </div>
      <div class="colLeft center" style="WIDTH: 60px"> 申请时间 </div>
      <div class="colLeft center" style="WIDTH: 40px"> 状态 </div>
      <div class="colLeft center" style="WIDTH: 80px"> 会员等级 </div>
      <div class="colRight center" style="WIDTH: 80px;"> 操作 </div>
    </div>
    <div class="datalist">
      <xsl:for-each select="rows/row">
        <div class="row" style="height:50px;">
          <xsl:attribute name="onclick">TM.swithClass(this,'row','row selectBg')</xsl:attribute>
          <b class="colLeft" style="height:50px;WIDTH:30px">
          <input type="checkbox" name="ID" id="ID" unread="false" >
          <xsl:attribute name="value"><xsl:value-of select="ID"/></xsl:attribute>
          </input>
          </b>
          <div class="colLeft center" style="height:50px;WIDTH: 50px"> <xsl:value-of select="ID"/> </div>
          <div class="colLeft" style="height:50px;WIDTH: 240px; "> <a title="{F_Name}" class="L" style="font-weight:bold;" href="javascript:">
            <xsl:attribute name="onclick">TM.openTab('查看客户详细','<xsl:value-of select="ID"/>','')</xsl:attribute>
            <xsl:value-of select="F_Name"/></a> <br />
            <xsl:value-of select="F_RegionName"/>&nbsp;&nbsp;<xsl:value-of select="F_Address"/></div>
          <div class="colLeft" style="height:50px;WIDTH: 180px;">
            <xsl:attribute name="title"><xsl:value-of select="F_Contact"/>,<xsl:value-of select="F_Phone"/>,<xsl:value-of select="F_Email"/></xsl:attribute>
            <img alt="{F_Email}" src="/Icons/email1.gif" width="19" height="18" align="absmiddle" /><xsl:value-of select="F_Contact"/>(<xsl:value-of select="F_Mobile"/>) <br />
            电话：<xsl:value-of select="F_Phone"/>(<xsl:value-of select="F_Fax"/>) </div>
          <div class="colLeft" style="height:50px;WIDTH: 120px;">
            <xsl:if test="count(F_UserName)!=0">
              <a >
              <xsl:attribute name="onclick">TM.openTab('查看帐号信息','<xsl:value-of select="F_Passport_ID"/>','')</xsl:attribute>
              <xsl:value-of select="F_UserName"/>&nbsp;(<xsl:value-of select="F_Passport_ID"/>)</a><br />
              出租(<xsl:value-of select="F_RentOutCount"/>)&nbsp;二手(<xsl:value-of select="F_SellCount"/>)
            </xsl:if>
            <xsl:if test="count(F_UserName)=0">
              无此帐号
            </xsl:if>
            &nbsp; </div>
          <div class="colLeft center" style="height:50px;WIDTH: 60px;" title="{F_RegTime}"> <xsl:value-of select="substring(F_RegTime,6,5)"/> </div>
          <div class="colLeft center" style="height:50px;WIDTH: 40px">
            <xsl:choose>
              <xsl:when test="F_State=0">
                申请
              </xsl:when>
              <xsl:when test="F_State=1">
                正常
              </xsl:when>
              <xsl:when test="F_State=2">
                过期
              </xsl:when>
              <xsl:otherwise>
                <font color="red">禁用</font>
              </xsl:otherwise>
            </xsl:choose>
          </div>
          <div class="colLeft center" style="height:50px;WIDTH: 80px">  <a href="http://www.qzfc.com/htmls/corp/list11.htm" target="_blank" title="{F_VipName}/收费标准:{F_Cost}元"><xsl:value-of select="F_VipName"/></a> </div>
          <div class="colRight center" style="height:50px;WIDTH: 80px;"> <a >跟单</a> <a href="javascript:">
            <xsl:attribute name="onclick">TM.openTab('查看客户详细','<xsl:value-of select="ID"/>','')</xsl:attribute>
            查看</a> </div>
        </div>
      </xsl:for-each>
    </div>
    <div class="pagelist">
      <div class="menu">
        <label>
          <input onclick="TM.CheckBoxSelect('ID',this.checked)" type="checkbox" />
          全选</label>
        &nbsp;&nbsp;
        <select disabled="disabled" name="todo" id="todo" class="styleA" onchange="if(TM.doCheckBoxCmd(this.value,'ID',this.options[this.selectedIndex].rel))TM.tList();else return this.selectedIndex=0;">
          <option value="" style="color:#666">批量操作...</option>
          <option value="启用禁用" rel="1">启用</option>
          <option value="启用禁用" rel="0" style="color:red;">禁用</option>
          <option value="删除通行证" rel="0" style=" background:red;color:white">删除(不可恢复)</option>
        </select>
      </div>
      <div class="pager"> 每页<xsl:value-of select="$maxrow"/>条| 共有 <xsl:value-of select="$rowcount"/> 条&nbsp;| 分页:<xsl:value-of select="user:PageList($curpage,$rowcount,'')" disable-output-escaping="yes"/> </div>
    </div>
  </xsl:template>
</xsl:stylesheet>
